/*
 * Coordonnees.java
 *
 * Created on 12 novembre 2007, 17:00
 */

package com.reimscopie;

import java.util.* ;


/**
 * This object is a user account, without persistence.
 */
public class PersonalInfo extends Value {
  
  // personal datas
  private String name ;
  private String firstname ;
  private String street ;
  private String city ;
  private String postalCode ;
  private String phone ;
  private String country ;
  
  
  /**
   * Create a new instance of <code>PersonalInfo</code> with all attributes. This
   * object an no image in the database.
   *
   * @param name The name of this entry.
   * @param firstname The firstname of this entry.
   * @param street The street of this entry.
   * @param city The city of this entry.
   * @param postalCode The postal code of this entry.
   * @param phone The phone number of this entry.
   * @param country The country of this entry.
   */
  public PersonalInfo(String name,String firstname,String street,String city,
      String postalCode,String phone,String country) {
    
    super() ;
    
    this.name        = name ;
    this.firstname   = firstname ;
    this.street      = street ;
    this.city        = city ;
    this.street      = street ;
    this.postalCode  = postalCode ;
    this.phone       = phone ;
    this.country     = country ;
    
  }
  
  
  /**
   * Create a new instance of <code>PersonalInfo</code> with an image in the 
   * database.
   *
   * @param id The entry id in the database.
   * @param name The name of this entry.
   * @param firstname The firstname of this entry.
   * @param street The street of this entry.
   * @param city The city of this entry.
   * @param postalCode The postal code of this entry.
   * @param phone The phone number of this entry.
   * @param country The country of this entry.
   */
  public PersonalInfo(long id,String name,String firstname,String street,
      String city,String postalCode,String phone,String country) {
    
    super(id) ;
    
    this.name        = name ;
    this.firstname   = firstname ;
    this.street      = street ;
    this.city        = city ;
    this.street      = street ;
    this.postalCode  = postalCode ;
    this.phone       = phone ;
    this.country     = country ;
    
  }
  
  
  /**
   * Return the name of this entry.
   *
   * @return The name of this entry.
   */
  public String getName() {
    return name ;
  }
  

  /**
   * Sets the name of this entry.
   *
   * @param name The new name of this entry.
   */
  public void setName(String name) {
    this.name = name ;
  }
  
  
  /**
   * Return the firstname of this entry.
   *
   * @return The firstname of this entry.
   */
  public String getFirstName() {
    return firstname ;
  }
  
  
  /**
   * Sets the firstname of this entry.
   *
   * @param firstname The new firstname of this entry.
   */
  public void setFirstName(String firstname) {
    this.firstname = firstname ;
  }
  
  
  /**
   * Return the street of this entry.
   *
   * @return The street.
   */
  public String getStreet() {
    return street ;
  }
  
  
  /**
   * Sets the street of this entry.
   *
   * @param street The new street of this entry.
   */
  public void setStreet(String street) {
    this.street = street ;
  }
  
  
  /**
   * Return the postal code of this entry.
   *
   * @return The postal code.
   */
  public String getPostalCode() {
    return postalCode;
  }
  
  
  /**
   * Sets the postalCode of this entry.
   *
   * @param postalCode The new postal code of this entry.
   */
  public void setPostalCode(String postalCode) {
    this.postalCode = postalCode ;
  }
  
  
  /**
   * Return the city of this entry.
   *
   * @return The city.
   */
  public String getCity() {
    return city ;
  }
  
  
  /**
   * Return the phone number of this entry.
   *
   * @return The phone number.
   */
  public String getPhone() {
    return phone ;
  }
  
  
  /**
   * Sets the phone number of this entry.
   *
   * @param phone The new phone number of this entry.
   */
  public void setPhone(String phone) {
    this.phone = phone ;
  }
  
  
  /**
   * Return the country of this entry.
   *
   * @return The country.
   */
  public String getCountry() {
    return country;
  }
  
  
  /**
   * Sets the country of this entry.
   *
   * @param country The new country of this entry.
   */
  public void setCountry(String country) {
    this.country = country ;
  }
  
  
  /**
   * Create a new map with all attributes of this value.
   *
   * @return A string-string map with the named attributes.
   */
  @Override
  public Map<String,String> toMap() {
    
    Map<String,String> map = new LinkedHashMap<String,String>() ;
    
    map.put("name",name) ;
    map.put("firstname",firstname) ;
    map.put("street",street) ;
    map.put("city",city) ;
    map.put("postalCode",postalCode) ;
    map.put("phone",phone) ;
    map.put("country",country) ;
    
    return map ;
  }
  
}
